<%@ page contentType="text/html; charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>添加宠物</title>
    <link rel="stylesheet" type="text/css" href="../style/header.css"/>
</head>
<body>
<link rel="stylesheet" type="text/css" href="../style/header.css"/>
<%@ include file="../common/header.jsp" %>

<h1>添加宠物</h1>
<div class="form-container">
    <form action="addPet.pet" method="post">
        <label for="avatar">宠物头像：</label>
        <input type="file" name="avatar" id="avatar" accept="image/*"/>

        <label for="name">宠物名称：</label>
        <input type="text" name="name" id="name" placeholder="请输入宠物名字"/>

        <label for="species">种类：</label>
        <input type="text" name="species" id="species" placeholder="例如：狗、猫"/>

        <label for="birthday">生日：</label>
        <input type="date" name="birthday" id="birthday"/>

        <label for="gender">性别：</label>
        <select name="gender" id="gender">
            <option value="1">雄性</option>
            <option value="2">雌性</option>
            <option value="0">未知</option>
        </select>

        <label for="isPublic">是否公开：</label>
        <select name="isPublic" id="isPublic">
            <option value="1">公开</option>
            <option value="0">私有</option>
        </select>

        <button type="submit" class="btn-submit">提交</button>
    </form>
</div>

</body>
<style>
    body {
        font-family: Arial, sans-serif;
        padding: 30px;
    }
    h1 {
        text-align: center;
        color: #333;
    }
    .form-container {
        max-width: 600px;
        margin: 0 auto;
        padding: 25px;
        border: 1px solid #ddd;
        border-radius: 10px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        background-color: #f9f9f9;
    }
    label {
        display: block;
        margin-top: 15px;
        font-weight: bold;
    }
    input[type="text"],
    input[type="date"],
    select {
        width: 100%;
        padding: 8px;
        margin-top: 5px;
        border-radius: 5px;
        border: 1px solid #ccc;
    }
    input[type="file"] {
        margin-top: 5px;
    }
    .btn-submit {
        margin-top: 25px;
        padding: 10px 20px;
        background-color: #4CAF50;
        border: none;
        color: white;
        border-radius: 5px;
        cursor: pointer;
    }
    .btn-submit:hover {
        background-color: #45a049;
    }
</style>
</html>

